# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Peter Shkenev <santurysim@gmail.com>
pkgname=py3-distlib
pkgver=0.3.8
pkgrel=1
pkgdesc="Distribution utilities"
url="https://github.com/pypa/distlib"
arch="noarch"
license="PSF-2.0"
depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/pypa/distlib/archive/refs/tags/$pkgver.tar.gz
	10-remove-funky-test.patch
	"
builddir="$srcdir/distlib-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONHASHSEED=0 python3 -m unittest discover tests
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/distlib*.whl

	rm "$pkgdir"/usr/lib/python3*/site-packages/distlib/*.exe
}

sha512sums="
98dc6459f54783598aad8ee3b8d80c0092a5d08d4272ad212faeef5e30cf9029b718231681f39d26e48588bb676bae7919f1431ddb51eb3917725f99a5c90457  py3-distlib-0.3.8.tar.gz
c77d21ec087abe6dbd80bcfc20f3b26d881ff7f42e2ba37185fe6315934afda5be23eed7cc522ecf01d696ba031ed83a2a43e87cd7be6ee7a7963eaa95afebe7  10-remove-funky-test.patch
"
